package com.masterrabbit.mcslf.controller;



import com.masterrabbit.mcslf.mapper.ActivitiesMapper;
import com.masterrabbit.mcslf.pojo.Activities;
import com.masterrabbit.mcslf.service.ActivitiesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {


    @Autowired
    ActivitiesService activitiesService;

@Autowired
    ActivitiesMapper activitiesMapper;
    @RequestMapping("/test")
    public String gettest(){
        List<Activities> list = activitiesService.list();
        System.out.println(list.size());
        for (Activities activities : list) {
            System.out.println(activities.toString());
        }
        return "success";
    }
}
